package edu.sctu.zhoudie.mouth201506.day20150602.Railway;

/**
 * Created by user08 on 2015/6/2.
 */
public class MyPrint {
   public void myPrint(){
       PeopleAppbean people = new PeopleData().peopleData().get(0);
       if (people.isIs_card()) {
           if (new PackegeWay(people).checkpackege()) {
               System.out.println("包裹有违禁品");
           } else {
               if (new PackegeWay(people).chaWater()) {
                   System.out.println("水有问题");
               } else {
                   if (people.getPrice() > 2) {
                       System.out.println("进站");
                   } else {
                       new CardWay().setPrice(10, people);
                       System.out.println("充值成功");
                   }
                   if (people.getPrice() >= new CardWay().getPrice(
                           people.getStart(), people.getEnd())) {
                       System.out.println("出站,余额为:"
                               + (people.getPrice() - new CardWay().getPrice(
                               people.getStart(), people.getEnd())));
                   } else {
                       new CardWay().setPrice(10, people);
                       System.out.println("充值成功");
                   }
               }

           }
       } else {
           System.out.println("买票");
           if (new PackegeWay(people).checkpackege()) {
               System.out.println("包裹有违禁品");
           } else {
               if (new PackegeWay(people).chaWater()) {
                   System.out.println("水有问题");
               } else {
                   System.out.println("出站");
               }
           }
       }
   }
    /**
     *  监控系统
     */
    public boolean monitorSystem(){
        boolean is_danger = false;
        return is_danger;
    }

}


